import java.util.Scanner;

public class Main2{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        double weight = in.nextDouble();
        CostEstimator ce = new CostEstimator();
        double cost = ce.estimate(weight);
        if (cost == -1){
            System.out.println("invalid weight");
        }
        else{
            System.out.printf("%.1f", cost);
        }
    }
}

/* 请在这里填写答案 */
class CostEstimator {
    public double estimate(double weight){
        // 在这里实现这个函数
        if(weight > 20 || weight <= 0){
            return -1;
        }else{
            if(weight > 0 && weight <= 1){
                return 3.5;
            }else if(weight > 1 && weight <= 3){
                return 5.5;
            }else if(weight > 3 && weight <= 10){
                return 8.5;
            }else {
                return 10.5;
            }
        }
    }
}
